FROM ubuntu:22.04

LABEL maintainer="Zheng Qijun <zhengqijun0121@qq.com>"

ARG DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y --no-install-recommends ca-certificates && \
    sed -i 's/http:\/\/security.ubuntu.com\|http:\/\/archive.ubuntu.com/https:\/\/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \
    apt update && apt install -y --no-install-recommends make build-essential libncurses-dev libgtk-3-dev libatk1.0-dev \
        libcairo2-dev libx11-dev libxpm-dev libxt-dev python3-dev ruby-dev lua5.2 liblua5.2-dev libperl-dev git && \
    rm -rf /var/lib/apt/lists/* && \
    echo 'root:111111' | chpasswd && \
    git config --global user.name 'zhengqijun' && \
    git config --global user.email 'zhengqijun0121@qq.com' && \
    git clone https://gitee.com/zhengqijun/vim ~/Workspace/vim

#    ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-python3interp=yes \
#        --with-python3-config-dir=$(python3-config --configdir) --enable-perlinterp=yes --enable-luainterp=yes \
#        --enable-gui=gtk3 --enable-cscope --with-x --enable-fail-if-missing --prefix=/usr/local && \
#    make -j4

ENV SHELL /bin/bash
ENV HOME /root/Workspace/vim
ENV USER root
ENV USERNAME root

WORKDIR $HOME

# ENTRYPOINT ["/bin/bash"]

EXPOSE 22

# EOF

